{% extends "df_goods/base.html" %}



{% block list_detail %}
    <div class="main_wrap clearfix">
        <div class="l_wrap fl clearfix">
            <div class="new_goods">
                <h3>新品推荐</h3>
                <ul>
                    {% for goods in goodsNew %}
                        <li>
                            <a href="/{{ goods.id }}/"><img src="/static/{{ goods.gpic }}"></a>
                            <h4><a href="/{{ goods.id }}/">{{ goods.gtitle|slice:"10" }}</a></h4>
                            <div class="prize">￥{{ goods.gprice }}</div>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>

        <div class="r_wrap fr clearfix">
            <div class="sort_bar">
                <a href="/list{{ goodsType.id }}_1_1/"
                        {% if sortId == 1 %}
                   class="active"
                        {% endif %}
                >默认</a>
                <a href="/list{{ goodsType.id }}_1_2/"
                        {% if sortId == 2 %}
                   class="active"
                        {% endif %}
                >价格</a>
                <a href="/list{{ goodsType.id }}_1_3/"
                        {% if sortId == 3 %}
                   class="active"
                        {% endif %}
                >人气</a>
            </div>

            <ul class="goods_type_list clearfix">
                {% for goods in page %}
                    <li>
                        <a href="/{{ goods.id }}/"><img src="/static/{{ goods.gpic }}"></a>
                        <h4><a href="/{{ goods.id }}/">大兴大棚草莓</a></h4>
                        <div class="operate">
                            <span class="prize">￥{{ goods.gprice }}</span>
                            <span class="unit">{{ goods.gunit }}</span>
                            <a href="#" class="add_goods" title="加入购物车"></a>
                        </div>
                    </li>
                {% endfor %}

            </ul>

            <div class="pagenation">
                {% if page.has_previous %}
                    <a href="/list{{ goodsType.id }}_{{ page.previous_page_number }}_{{ sortId }}">
                        <上一页
                    </a>
                {% endif %}

                {% for pageIndex in pagenator.page_range %}
                    {% if pageIndex == page.number %}
                        <a href="#" class="active">{{ pageIndex }}</a>
                    {% else %}
                        <a href="/list{{ goodsType.id }}_{{ pageIndex }}_{{ sortId }}/" class="active">{{ pageIndex }}</a>
                    {% endif %}
                {% endfor %}


                {% if page.has_next %}
                    <a href="/list{{ goodsType.id }}_{{ page.next_page_number }}_{{ sortId }}">下一页></a>
                {% endif %}
            </div>
        </div>
    </div>
{% endblock list_detail %}
